<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport"
          content="width=device-width, initial-scale=1">
    <title>我的挑战</title>

    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="icon" type="image/png" href="assets/i/favicon.png">

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
    <meta name="msapplication-TileColor" content="#0e90d2">


    <link rel="stylesheet" href="../assets/css/amazeui.min.css">
    <link rel="stylesheet" href="../assets/js/layui/css/layui.css">
    <link rel="stylesheet" href="../assets/css/global.css">

    <link rel="stylesheet" href="../assets/css/choose.css">
    <link rel="stylesheet" href="../assets/css/popup.css">


    <link rel="stylesheet" href="../assets/css/my_challenge.css">


</head>
<body>
<div id="index_div">
    <div class="app-bg"></div>

    <div class="app-main">

        <!--头部-->
        <div class="head-box">
            <img src="../assets/i/left.png" height="24" alt=""  onclick="window.location.href='user.html';">
            <span>我的挑战</span>
        </div>
        <!--头部End-->

        <div class="my-challenge-wrap">
            <div class="my-challenge">
                <div class="my-challenge-tab-box">

                    <!--切换按钮-->
                    <div class="my-challenge-tab-head am-text-center" v-cloak>
                        <span v-bind:class="{'active':type == 0}" v-on:click="switchType(0)">挑战记录</span>
                        <span v-bind:class="{'active':type == 1}" v-on:click="switchType(1)">挑战卡明细</span>
                    </div>
                    <!--切换按钮End-->

                    <!--内容容器-->
                    <div class="my-challenge-tab-content" v-cloak>

                        <!--切换项1-->
                        <div class="my-challenge-tab-content-item" v-bind:class="{'active':type == 0}">

                            <!--挑战记录项-->
                            <div class="challenge-record-item" v-for="(challenge,index) in my_challenge_list">
                                <img src="../images/challenge_trophy.png" width="80" alt="">
                                <div class="challenge-record-item-box">
                                    <div class="challenge-record-item-content">
                                        <span class="receive-type" v-if="challenge.status==0">未领取</span>
                                        <span class="receive-type" v-if="challenge.status==1">抢答中</span>
                                        <span class="receive-type" v-if="challenge.status==2">已撤回</span>
                                        <span class="receive-type" v-if="challenge.status==3">已领取</span>
                                        <span class="receive-time">{{challenge.create_time | timestampToTime}}</span><br>
                                        <a :href="challenge.id | getAnswerHref"><span class="receive-detail-btn">挑战详情</span></a>
                                        <span class="withdraw-btn" v-if="challenge.can_be_recall==1" @click="onBackChallenge(index)">可撤回挑战</span>
                                    </div>
                                </div>
                            </div>
                            <!--挑战记录项End-->

                        </div>
                        <!--切换项1End-->

                        <!--切换项2-->
                        <div class="my-challenge-tab-content-item" v-bind:class="{'active':type == 1}">
                            <span class="challenge-totol-num am-text-center margintop10">获得挑战卡总数：{{history_answer_money |integral}}</span>

                            <!--挑战卡明细-->
                            <div class="card-detail-item" v-for="card_log in card_log_list" v-if="card_log.money_type ==0">
                                <span class="card-detail-content">{{card_log.desc}}，挑战卡</span>
                                <span class="card-detail-num" v-if="card_log.in_out_type ==0">+{{card_log.money | integral}}</span>
                                <span class="card-detail-num" v-if="card_log.in_out_type ==1">-{{card_log.money | integral}}</span>
                                <span class="card-detail-time">{{card_log.create_time | timestampToTime}}</span>
                            </div>
                            <!--挑战卡明细End-->

                        </div>
                        <!--切换项2End-->

                    </div>
                    <!--内容容器-->

                </div>
            </div>
        </div>
    </div>


    <!--提现-->
    <div class="pop-up-box" id="back_money_pop_up" @click="onClosePopupVue">
        <div class="back-money-box" @click.stop.prevent>
            <div class="close-box" onclick="onClosePopup(this)">
                <img src="../assets/i/close.png" width="14" alt="">
            </div>
            <div class="withdrawal-content-box am-text-center">
                <img src="../images/popUp/back_money.png" width="54" alt="">
                <span class="back-money-title margintop25">{{config_info.withdraw_time}}小时内红包未被领取，可点击撤回金额将全额退还您的支付账户</span>
                <span class="pop-up-btn margintop25" @click="onConfrimBackChallenge">确认撤回</span>
            </div>
        </div>
    </div>
</div>


<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="../assets/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="../assets/js/amazeui.min.js"></script>
<script src="../assets/js/layui/layui.js"></script>
<script src="../assets/js/global.js"></script>

<script src="../assets/js/vue.js"></script>

<!--页面内js-->
<script src="../assets/js/frontend/my_challenge.js"></script>


</body>
</html>
